var connect=require('connect');
var route=require('./route');
var app=connect();
var routers={
    GET:{
        '/users':function (req, res) {
            res.end('GET: /users');
        },
        '/u/:id':function (req, res) {
            res.end('GET: /u/'+req.params.id);
        },
        '/u/:id/:name/:title':function (req, res) {
            res.end('GET: /u/'+req.params.id+'/'+req.params.name+'/'+req.params.title);
        }
    },
    DELETE:{
        '/u/:id':function (req, res,id) {
            res.end('DELETE :/user/'+id);
        }
    }
}
app.use(route(routers)).listen(3001,function () {
    console.log('Route port:3001',new Date());
});